package com.pesking.core.sqlparser.processor;

import java.util.Arrays;
import java.util.List;

import com.pesking.core.parameter.Parameter;
import com.pesking.core.sqlparser.parameter.SqlParameter;
import com.pesking.core.sqlparser.parameter.SqlParameterProcessor;
import com.pesking.core.thread.ThreadManage;

public class FetchUrlDomainLParameterSqlHandler extends SqlParameterProcessor {

	@Override
	public void handle(StringBuilder sbSQL, Parameter parameter, List<SqlParameter> processors,SqlParameter sqlParameter) {
		String url = ThreadManage.getCurrentRequest().getServerName();
		sbSQL.append("'").append(url).append("'");
	}

	@Override
	public List<String> getSqlParameterType() {
		return Arrays.asList(new String []{"URL_DOMAIN"});
	}

}
